package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.pojo.Forum;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author testjava
 * @since 2022-08-20
 */
@Mapper
public interface ForumMapper extends BaseMapper<Forum> {
    List<Forum> getForumList(@Param("fid") Integer fid, @Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize);

    Forum selectByFid(@Param("fid") Integer fid);

    boolean updateForum(@Param("forumId") Integer forumId, @Param("topicCount") Integer topicCount,
                        @Param("articleCount") Integer articleCount, @Param("tid") Integer tid);

    Forum getBeforeOne(@Param("position") Integer position);

    Forum getAfterOne(@Param("position") Integer position);
}
